package com.iflysse.mapper;


import com.iflysse.pojo.bo.req.UserBoReq;
import com.iflysse.pojo.bo.resp.UserBoResp;
import com.iflysse.pojo.po.resp.UserPoResp;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper {

    /**
     * 根据用户账号获取密码
     * @param userName 用户账户
     * @return
     */
    @Select("select account_id as userId,role from tb_account where account_number = #{userName}")
    UserPoResp getByUserName(String userName);

    @Select("select account_id as UserId,role from tb_account where account_number = #{userName} and password = #{passWord}")
    UserPoResp login(UserBoReq userBoReq);
}
